package com.badboy.mapper;

import com.badboy.entity.PostManagement;
import org.apache.ibatis.annotations.Select;

/**
* @author 33314
* @description 针对表【post_management】的数据库操作Mapper
* @createDate 2025-05-12 15:38:06
* @Entity com.badboy.entity.PostManagement
*/
public interface PostManagementMapper {

    int deleteByPrimaryKey(Long id);

    int insert(PostManagement record);

    int insertSelective(PostManagement record);

    PostManagement selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PostManagement record);

    int updateByPrimaryKey(PostManagement record);
    @Select("SELECT likeCount FROM post_management WHERE postCount_id = #{postId}")
    Integer selectLikeCountByPostId(Long postId);

    @Select("SELECT commentCount FROM post_management WHERE postCount_id = #{postId}")
    Integer selectCommentCountByPostId(Long postId);
}
